--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+ <data>
+ <record id="invoice_form" model="ir.ui.view">
+ <field name="name">account.invoice.form</field>
+ <field name="model">account.invoice</field>
+ <field name="inherit_id" ref="account.invoice_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='account_analytic_id']" position="attributes">
+ <attribute name="required">1</attribute>
+ </xpath>
+ <xpath expr="//tree/field[@name='account_analytic_id']" position="replace">
+ <field name="account_analytic_id" domain="[('type', '=', 'normal'), ('company_id', '=', parent.company_id), ('code', '!=', 'False'), ('state', '=', 'open')]" required="1" />
+ </xpath>
+ </field>
+ </record>
+ <record id="view_invoice_supplier_form" model="ir.ui.view">
+ <field name="name">account.invoice.form</field>
+ <field name="model">account.invoice</field>
+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='account_analytic_id']" position="attributes">
+ <attribute name="required">1</attribute>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<openerp>
- <data>
- <record id="invoice_form" model="ir.ui.view">
- <field name="name">account.invoice.form</field>
- <field name="model">account.invoice</field>
- <field name="inherit_id" ref="account.invoice_form"/>
- <field name="arch" type="xml">
- <xpath expr="//field[@name='account_analytic_id']" position="attributes">
- <attribute name="required">1</attribute>
- </xpath>
- <xpath expr="//tree/field[@name='account_analytic_id']" position="replace">
- <field name="account_analytic_id" domain="[('type', '=', 'normal'), ('company_id', '=', parent.company_id), ('code', '!=', 'False'), ('state', '=', 'open')]" required="1" />
- </xpath>
- </field>
- </record>
- </data>
-</openerp>
<field name="name">purchase.order.form</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
- <field name="priority" eval="8"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='account_analytic_id']" position="attributes">
<attribute name="required">1</attribute>